﻿<UserControl x:Class="OnlineGameClient.View.MainView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:v="clr-namespace:OnlineGameClient.View"
             xmlns:myctl="clr-namespace:OnlineGameClient.Control"
                 xmlns:comm="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="*" />
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <Grid>
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF909090" Offset="0" />
                    <GradientStop Color="White" Offset="1" />
                </LinearGradientBrush>
            </Grid.Background>
            <TextBlock FontSize="24" Text="Online Board Game Platform" FontFamily="Portable User Interface" FontWeight="Normal">
                <TextBlock.Effect>
                    <DropShadowEffect ShadowDepth="1"/>
                </TextBlock.Effect>
                <TextBlock.Foreground>
                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </TextBlock.Foreground>
            </TextBlock>
            <HyperlinkButton HorizontalAlignment="Right" FontSize="16" Content="{Binding LoginPlayer.PlayerID,FallbackValue=Login}" FontStyle="Italic" comm:Click.Command="{Binding PlayerLoginCommand}"
                             comm:Click.CommandParameter="{Binding LoginPlayer}">
                <HyperlinkButton.Effect>
                    <DropShadowEffect ShadowDepth="1"/>
                </HyperlinkButton.Effect>
            </HyperlinkButton>
        </Grid>
        <toolkit:TransitioningContentControl Grid.Row="1" Name="tcc1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
            <v:GameRoomsView/>
        </toolkit:TransitioningContentControl>
        <!--<ContentPresenter Name="tcc1" Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <v:GameRoomsView/>
        </ContentPresenter>-->

        <Grid Grid.Row="2">
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF909090" Offset="1" />
                    <GradientStop Color="Silver" Offset="0" />
                </LinearGradientBrush>
            </Grid.Background>
            <myctl:MyProgressBar Value="{Binding DownloadProgress}" HorizontalAlignment="Left" Margin="5" Width="100"/>
            <Border Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Bottom"  CornerRadius="5">
                <Border.Effect>
                    <DropShadowEffect  ShadowDepth="1"/>
                </Border.Effect>
                <StackPanel>
                    <TextBlock FontStyle="Italic"  FontSize="10" Foreground="Silver" Text="version 0.5.2"/>
                    <HyperlinkButton Content="Feedback to me" NavigateUri="mailto:mogliang@gmail.com"/>
                </StackPanel>
        </Border>
        </Grid>
    </Grid>
</UserControl>
